<?php

abstract class Controller
{
    protected $view = null;
    protected $model = null;

    public function enter()
    {
    }

    public function __construct()
    {
        if ($cls = App::route("Model")) {
            $this->model = new $cls();
        }

        if ($cls = App::route("View")) {
            $this->view = new $cls();
        }

        $this->enter();
    }
}